package com.ftqh.tutorial.service;

import com.alibaba.fastjson.JSONArray;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by Administrator on 2017/4/28.
 */
@FeignClient("compute-service")
public interface ComputeClient {

    @GetMapping("/add")
    Integer add(@RequestParam(value = "a") Integer a, @RequestParam(value = "b") Integer b);

    @PostMapping("/users")
    JSONArray getUsers(@RequestParam(value = "ids")String[] ids);

    @PostMapping("/users/bytes")
    String sendBytes(Byte [] file);
}
